﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AutoLog
{
    public partial class AddVehicle : Form
    {
        public AddVehicle()
        {
            InitializeComponent();
        }

        private void tbMakeModel_TextChanged( object sender, EventArgs e )
        {
            UpdateNickname();
        }

        private void nudYear_ValueChanged( object sender, EventArgs e )
        {
            UpdateNickname();
        }

        private void UpdateNickname()
        {
            tbName.Text = tbMake.Text + " " + tbModel.Text + " (" + nudYear.Value + ")";
        }

        private void AddVehicle_Load( object sender, EventArgs e )
        {
            // TODO: This line of code loads data into the 'dsUsers.User' table. You can move, or remove it, as needed.
            this.userTableAdapter.Fill( this.dsUsers.User );

        }

        private void btnAddUser_Click( object sender, EventArgs e )
        {
            AddUser au = new AddUser();
            au.ShowDialog();
        }
    }
}
